across all the relevant platforms. Thanks to Sven Joachim
<svenjoac@gmx.de> for the fix. (closes: #503054)
- -- Rob Browning <rlb@defaultvalue.org> Sun, 09 Nov 2008 10:40:43 -0800
+ * Set mail-interactive to t if /usr/bin/mail is not an executable and
+ fakemail is chosen. This should still help avoid silent mail loss,
+ but won't signal an error if the mailer is never invoked. Thanks to
+ Ralf Resack <horch_loeffelchen@yahoo.de> for proposing the
+ fix. (closes: #429059)
+
+ -- Rob Browning <rlb@defaultvalue.org> Sun, 09 Nov 2008 12:05:33 -0800
emacs22 (22.2+2-4) unstable; urgency=medium
For now, Debian sets fakemail's MAIL_PROGRAM_NAME to /usr/bin/mail
(which is the correct value for Debian systems) rather than
- /bin/mail. Debian also adjusts Emacs to test for the existence of
- /usr/bin/mail before trying to run fakemail. This is not an ideal
- solution, but it should be an improvement.
+ /bin/mail. Debian also adjusts Emacs to test whether or not
+ /usr/bin/mail exists and is executable. If either of these tests
+ fail, then mail-interactive is set to t. That should ensure that a
+ user will actually see an error if they attempt to use the broken
+ fakemail.
- Note that Debian forces the value to /usr/bin/mail. The build will
- fail if any other value is specified. This is done to ensure that
- MAIL_PROGRAM_NAME isn't accidentally set to some other value during
- the build process. If this is undesirable for some reason, just
- commment out avoid-fakemail-loss.diff in debian/patches/series.
+ Note that Debian actually forces the MAIL_PROGRAM_NAME value to
+ /usr/bin/mail. The build will fail if any other value is specified.
+ This is done to ensure that MAIL_PROGRAM_NAME isn't accidentally set
+ to some other value during the build process. If this is
+ undesirable for some reason, just comment out
+ avoid-fakemail-loss.diff in debian/patches/series.
Index: sid/lib-src/fakemail.c
===================================================================
===================================================================
--- sid.orig/lisp/mail/feedmail.el
+++ sid/lisp/mail/feedmail.el
-@@ -1348,7 +1348,10 @@
+@@ -1348,7 +1348,12 @@
"/usr/lib/sendmail")
((file-exists-p "/usr/ucblib/sendmail")
"/usr/ucblib/sendmail")
- (t "fakemail"))
+ (t
+ (if (not (file-executable-p "/usr/bin/mail"))
-+ (error "/usr/bin/mail is not executable"))
++ (progn
++ (message "/usr/bin/mail is not an executable. Setting mail-interactive to t.")
++ (setq mail-interactive t)))
+ "fakemail"))
nil errors-to nil "-oi" "-t")
;; provide envelope "from" to sendmail; results will vary
===================================================================
--- sid.orig/lisp/mail/sendmail.el
+++ sid/lisp/mail/sendmail.el
-@@ -53,7 +53,10 @@
+@@ -53,7 +53,12 @@
((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
- (t "fakemail")) ;In ../etc, to interface to /bin/mail.
+ (t
+ (if (not (file-executable-p "/usr/bin/mail"))
-+ (error "/usr/bin/mail is not executable"))
++ (progn
++ (message "/usr/bin/mail is not an executable. Setting mail-interactive to t.")
++ (setq mail-interactive t)))
+ "fakemail")) ;In ../etc, to interface to /bin/mail.
"Program used to send messages."
:group 'mail
===================================================================
--- sid.orig/lisp/gnus/message.el
+++ sid/lisp/gnus/message.el
-@@ -4026,7 +4026,12 @@
+@@ -4026,7 +4026,13 @@
"/usr/lib/sendmail")
((file-exists-p "/usr/ucblib/sendmail")
"/usr/ucblib/sendmail")
- (t "fakemail"))
+ (t
-+ (if (not
-+ (file-executable-p "/usr/bin/mail"))
-+ (error
-+ "/usr/bin/mail is not executable"))
++ (if (not (file-executable-p
++ "/usr/bin/mail"))
++ (progn
++ (message "/usr/bin/mail is not an executable. Setting mail-interactive to t.")
++ (setq mail-interactive t)))
+ "fakemail"))
nil errbuf nil "-oi")
;; Always specify who from,